<!-- 装修用户组件：用户资产 -->
<template>
	<view class="ss-wallet-menu-wrap ss-flex ss-col-center">
		<view class="my-wallet" @tap="sheep.$router.go('/pages/index/cart')">
			<view class="left">
				<image class="user-lingshi" :src="sheep.$url.static('/assets/img/user-lingshi@2x.png')" mode="aspectFill"></image>
			</view>
			<view class="center">
				<count-to class="center-number ss-m-r-20 font-DIN" :startVal="0" :endVal="0.237676" :decimals="6" :duration="3000"></count-to>
				<view class="center-text ss-m-r-20 font-PingFangBold">
					我的灵石
				</view>
			</view>
			<view class="right">
				<image class="user-fanhui" :src="sheep.$url.static('/assets/img/user-fanhui@2x.png')" mode="aspectFill"></image>
			</view>
		</view>
			
<!-- 		<view class="menu-item ss-flex-1 ss-flex-col ss-row-center ss-col-center"
			@tap="sheep.$router.go('/pages/user/wallet/money')">
			<view class="value-box ss-flex ss-col-bottom">
				<view class="value-text ss-line-1">{{ fen2yuan(userWallet.balance) || '0.00' }}</view>
				<view class="unit-text ss-m-l-6">元</view>
			</view>
			<view class="menu-title ss-m-t-28">账户余额</view>
		</view> -->
<!-- 		<view class="menu-item ss-flex-1 ss-flex-col ss-row-center ss-col-center"
			@tap="sheep.$router.go('/pages/user/wallet/score')">
			<view class="value-box ss-flex ss-col-bottom">
				<view class="value-text">{{ userInfo.point || 0 }}</view>
				<view class="unit-text ss-m-l-6">个</view>
			</view>
			<view class="menu-title ss-m-t-28">积分</view>
		</view> -->
<!-- 		<view class="menu-item ss-flex-1 ss-flex-col ss-row-center ss-col-center" @tap="
        sheep.$router.go('/pages/coupon/list', {
          type: 'geted',
        })
      ">
			<view class="value-box ss-flex ss-col-bottom">
				<view class="value-text">{{ numData.unusedCouponCount }}</view>
				<view class="unit-text ss-m-l-6">张</view>
			</view>
			<view class="menu-title ss-m-t-28">优惠券</view>
		</view> -->
		<!-- <view class="menu-item ss-flex-col ss-row-center ss-col-center menu-wallet"
          @tap="sheep.$router.go('/pages/user/wallet/money')">
			<image class="item-icon" :src="sheep.$url.static('/static/img/shop/user/wallet_icon.png')" mode="aspectFit" />
			<view class="menu-title ss-m-t-30">我的钱包</view>
		</view> -->
	</view>
</template>

<script setup>
	/**
	 * 装修组件 - 订单菜单组
	 */
	import { computed } from 'vue';
	import sheep from '@/sheep';
	import { fen2yuan } from '../../hooks/useGoods';
	import { CountTo } from 'vue3-count-to';

	const userWallet = computed(() => sheep.$store('user').userWallet);
	const userInfo = computed(() => sheep.$store('user').userInfo);
	const numData = computed(() => sheep.$store('user').numData);
</script>

<style lang="scss" scoped>
	.ss-wallet-menu-wrap {
		display: flex;
		flex-direction: row;
		justify-content: center;
		.my-wallet{
			width: calc(750rpx - 32px);
			height: 160rpx;
			background: #5350F1;
			box-shadow: inset -4rpx 4rpx 3rpx 0rpx #7B78FF, inset 4rpx -4rpx 3rpx 0rpx rgba(0,0,0,0.25);
			border-radius: 18rpx 18rpx 18rpx 18rpx;
			display: flex;
			flex-direction: row;
			align-items: center;
			justify-content: space-evenly;
			.left{
				.user-lingshi{
					width: 127.61rpx;
					height: 123.74rpx;
				}
			}
			.center{
				width: 400rpx;
				.center-number{
					font-family: DIN, DIN;
					font-weight: bold;
					font-size: 48rpx;
					white-space: nowrap;
					color: #FFFFFF;
					text-align: left;
					font-style: normal;
					text-transform: none;
				}
				.center-text{
					margin-top: 12rpx;
					white-space: nowrap;
					height: 34rpx;
					font-family: PingFang SC, PingFang SC;
					font-weight: 600;
					font-size: 24rpx;
					color: #FFFFFF;
					line-height: 34rpx;
					text-align: left;
					font-style: normal;
					text-transform: none;
				}
			}
			.right{
				.user-fanhui{
					width: 50rpx;
					height: 50rpx;
				}
			}
		}
		
		
		
		.menu-wallet {
			width: 144rpx;
		}

		.menu-item {
			height: 160rpx;

			.menu-title {
				font-size: 24rpx;
				line-height: 24rpx;
				color: #333333;
			}

			.item-icon {
				width: 44rpx;
				height: 44rpx;
			}

			.value-box {
				height: 50rpx;
				text-align: center;

				.value-text {
					font-size: 28rpx;
					color: #000000;
					line-height: 28rpx;
					vertical-align: text-bottom;
					font-family: OPPOSANS;
				}

				.unit-text {
					font-size: 24rpx;
					color: #343434;
					line-height: 24rpx;
				}
			}
		}
	}
</style>

